#include<iostream>
#include<fstream>
#include<sstream>
#include<map>
#include<string>
#include<vector>
#include<memory>
#include<set>

class TextQuery;
class Query_Base
{
    Queryresult void query(const TextQuery& lhs)=0;
};

class TextQuery
{
public:
    TextQuery();
    void readFile(const std::string& filenmae);
    void query(const std::string &word);
private:
    std::shared_ptr<std::vector<std::string>> _lines;
    std::map<std::string,std::shared_ptr<std::set<int>>> _word2Numbers;
};
